<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex align</title>
    <style>
        #container{
            display: flex;
            background-color:#555;
            /* justify-content 项目在主轴上的对齐方式 */
            justify-content: space-evenly;
            flex-wrap: wrap;
            height: 600px;
            align-items:center;
            align-content:flex-start;
         
        }
        .item{
            background-color: #f3f3f3;
            align-items:center;
            border: 1px solid #ccc;
            padding:1rem;
            margin:0.75rem;
            flex-basis: 100px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div id="container">
        <div class="item item1">
            <h3>Item1</h3>
        </div>
        <div class="item item2">
            <h3>Item2</h3>
        </div>
        <div class="item item3">
            <h3>Item3</h3>
        </div>
        
    </div>
</body>
</html>